package com.tensquare.entity;

import lombok.Data;
import org.codehaus.jackson.map.annotate.JsonSerialize;

import java.util.List;

@Data
public class PageResult<T> {

    private long total;

    @JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
    private List<T> rows;

    public PageResult() {}
    public PageResult(long total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }

}
